﻿using System.Collections.Generic;

namespace Vinno.Brand.Pack.Core.Entities
{
    /// <summary>
    /// 产品信息
    /// </summary>
    [Description("产品信息")]
    [EntitySchema(TableConstants.Brand, "VINNO")]
    public class Product : EntityBase<Guid>, ICreatedTime
    {
        /// <summary>
        /// 产品标题
        /// </summary>
        [Required]
        [StringSize(StringSizeType.General)]
        public string Title { get; set; }

        /// <summary>
        /// 产品简介
        /// </summary>
        [StringSize(StringSizeType.Data)]
        public string Description { get; set; }

        /// <summary>
        /// 标题图
        /// </summary>
        [Required]
        [DisplayName("标题图Id")]
        public long TitleImgId { get; set; }

        /// <summary>
        /// 产品宣传视频图链接
        /// </summary>
        [DisplayName("产品宣传视频图链接")]
        public long VideoImgId { get; set; }

        /// <summary>
        /// 产品宣传视频链接
        /// </summary>
        [DisplayName("产品宣传视频链接")]
        public string VideoUrl { get; set; }

        /// <summary>
        /// 产品类型
        /// </summary>
        public ProductType Type { get; set; }

        /// <summary>
        /// 是否新品
        /// </summary>
        public bool IsNew { get; set; }

        /// <summary>
        /// 排序号
        /// </summary>
        [DisplayName("排序号")]
        public int? OrderNo { get; set; }

        /// <summary>
        /// 获取或设置 创建时间
        /// </summary>
        [DisplayName("创建时间")]
        public DateTime CreatedTime { get; set; }

        public virtual FileEntity TitleImg { get; set; }

        public virtual FileEntity VideoImg { get; set; }

        public virtual List<ProductCase> ProductCases { get; set; }

    }
}
